package com.example.mybatisplus.tx;

import com.example.mybatisplus.tx.service.TxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 主要看数据库关于事务的处理方式
 * @author zhouxl
 * @DATE 2021/5/16
 * @descriptoin
 */
@Controller
@RequestMapping("/api/")
public class TxController {

    @Autowired
    private TxService txService;

    @RequestMapping("/tx/addUser")
    @ResponseBody
    public Object add(){
        Object obj = txService.addUser();
        return obj;
    }

}
